package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;

@Data
@TableName("messages")
public class Messages {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    
    @TableField("message_id")
    private String messageId;
    
    private String content;
    
    @TableField("message_type")
    private String messageType;
    
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;

    @TableField("sender_id")
    private Long senderId;
    
    @TableField("receiver_id")
    private Long receiverId;
    
    @TableField("is_group")
    private Boolean isGroup;
    
    @TableField("parent_id")
    private Long parentId;
    
    @TableField("forward_count")
    private Integer forwardCount;
    
    @TableField("delete_flag")
    private Integer deleteFlag;
    
    @TableField("file_info")
    private String fileInfo;
    
    @TableField("voice_duration")
    private Integer voiceDuration;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("read_time")
    private Date readTime;

    @TableField("encrypt_key")
    private String encryptKey;
    
    @TableField("mention_user_ids")
    private String mentionUserIds;
}
